#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main()
{
	int n, m;
	long long int digit_z = 0, digit_c = 0;
	scanf("%d%d", &n, &m);
	for (int i = 1; i <= n && i <= m; i++) {
		digit_z += (n + 1 - i) * (m + 1 - i);
	}
	for (int i = 1; i <= n; i++) {
		for (int j = 1; j <= m; j++) {
			digit_c += (n - i + 1) * (m - j + 1);
		}
	}
	printf("%lld %lld", digit_z, digit_c - digit_z);
	return 0;
}